package jee.boot.entity.activiti;

import jee.boot.common.annotation.Column;
import jee.boot.common.annotation.Table;

import java.util.Date;

/**
 * 流程设计模型部署表
 * 流程设计器设计流程后，保存数据到该表。
 */
@Table(name = "act_re_model")
public class ActModel extends ActDataEntity<ActModel> {
    private static final long serialVersionUID = 1L;
    /**
     * 乐观锁
     */
    @Column(name = "REV_")
    protected String rev;
    /**
     * 模型的名称
     */
    @Column(name = "NAME_")
    private String name;
    /**
     * 模型的关键字，流程引擎用到
     */
    @Column(name = "KEY_")
    private String key;
    /**
     * 类型，用户自己对流程模型的分类
     */
    @Column(name = "CATEGORY_")
    private String category;
    /**
     * 创建时间
     */
    @Column(name = "CREATE_TIME_")
    private Date createDate;
    /**
     * 最后修改时间
     */
    @Column(name = "LAST_UPDATE_TIME_")
    private Date updateDate;
    /**
     * 版本，从1开始
     */
    @Column(name = "VERSION_")
    private int version;
    /**
     * 以json格式保存流程定义的信息
     */
    @Column(name = "META_INFO_")
    private String metaInfo;
    /**
     * 部署的ID
     */
    @Column(name = "DEPLOYMENT_ID_", data = {"deployment.id", "deployment.name", "deployment.category","deployment.deployTime"})
    private ActDeployment deployment;
    /**
     * 编辑源值ID
     */
    @Column(name = "EDITOR_SOURCE_VALUE_ID_", data = {"editorSourceValue.id", "editorSourceValue.name"})
    private ActByteArray editorSourceValue;
    /**
     * 编辑源额外值ID
     */
    @Column(name = "EDITOR_SOURCE_EXTRA_VALUE_ID_", data = {"editorSourceExtraValue.id", "editorSourceExtraValue.name"})
    private ActByteArray editorSourceExtraValue;

    public ActModel() {
    }

    public ActModel(String id) {
        super(id);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    @Override
    public Date getCreateDate() {
        return createDate;
    }

    @Override
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Override
    public Date getUpdateDate() {
        return updateDate;
    }

    @Override
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public String getMetaInfo() {
        return metaInfo;
    }

    public void setMetaInfo(String metaInfo) {
        this.metaInfo = metaInfo;
    }

    public ActDeployment getDeployment() {
        return deployment;
    }

    public void setDeployment(ActDeployment deployment) {
        this.deployment = deployment;
    }

    public ActByteArray getEditorSourceValue() {
        return editorSourceValue;
    }

    public void setEditorSourceValue(ActByteArray editorSourceValue) {
        this.editorSourceValue = editorSourceValue;
    }

    public ActByteArray getEditorSourceExtraValue() {
        return editorSourceExtraValue;
    }

    public void setEditorSourceExtraValue(ActByteArray editorSourceExtraValue) {
        this.editorSourceExtraValue = editorSourceExtraValue;
    }

    public String getRev() {
        return rev;
    }

    public void setRev(String rev) {
        this.rev = rev;
    }

    public static void main(String[] args) {
        System.out.println(new ActModel().getGetSql());
    }
}
